package br.univas.bean;

import java.io.Serializable;

import javax.faces.bean.ManagedBean;

import br.univas.dao.DirectorDAO;
import br.univas.to.DirectorTO;

@ManagedBean(name="directorBean")
public class DirectorBean implements Serializable{

	private static final long serialVersionUID = 1L;
	private DirectorTO directorTo;
	private DirectorDAO directorDao;
	
	public DirectorBean() {
		directorTo = new DirectorTO();
		directorDao = new DirectorDAO();
	}
	
	/*CRUD*/
	public void saveDirector(){
		this.directorDao.saveDirectorGraph(this.directorTo);
	}
	public void updateDirector(){
		
	}

	
	/*Necessario para transi��o Bean and TO*/
	public DirectorTO getDirectorTo() {
		return directorTo;
	}
	
	public void setDirectorTo(DirectorTO directorTo) {
		this.directorTo = directorTo;
	}
	
	public DirectorDAO getDirectorDao() {
		return directorDao;
	}
	
	public void setDirectorDao(DirectorDAO directorDao) {
		this.directorDao = directorDao;
	}
	
	

}
